package com.starinside.wp.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;

/**
 * *******************************
 * Created by Tim.
 * form com.matt
 * on 2017/5/22
 * *******************************
 */
@MappedSuperclass
@Data
@JsonIgnoreProperties(value = {"handler","hibernateLazyInitializer","fieldHandler"})
public abstract class Model implements Serializable{

    @Id
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    @Column(length = 32)
    private String id;

//    @JsonIgnore
//    @NotNull
//    @Column(name = "created")
//    Date created = new Date();


//    @Transient
//    public Date getCreatedDate(){
//        return this.created;
//    }
}
